package com.docios.cookbook2.entity;

import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

@Entity(tableName = "user")
public class User {
    @PrimaryKey(autoGenerate = true)
    @ColumnInfo(name = "id")
    public int id;
    @ColumnInfo(name = "phone")
    public String phone;
    @ColumnInfo(name = "password")
    public String password;
    @ColumnInfo(name = "email")
    public String email;
    @ColumnInfo(name = "nick_name")
    public String nickName;
    @ColumnInfo(name = "create_time")
    public String createTime;
    @ColumnInfo(name = "avatar")
    public String avatar;
    @ColumnInfo(name = "slogan")
    public String slogan;
    @ColumnInfo(name = "appkey")
    public String appkey;

    public User(String phone, String password, String email, String nickName,
                String createTime, String avatar, String slogan, String appkey) {
        this.phone = phone;
        this.password = password;
        this.email = email;
        this.nickName = nickName;
        this.createTime = createTime;
        this.avatar = avatar;
        this.slogan = slogan;
        this.appkey = appkey;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getAvatar() {
        return avatar;
    }

    public void setAvatar(String avatar) {
        this.avatar = avatar;
    }

    public String getSlogan() {
        return slogan;
    }

    public void setSlogan(String slogan) {
        this.slogan = slogan;
    }

    public String getAppkey() {
        return appkey;
    }

    public void setAppkey(String appkey) {
        this.appkey = appkey;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", phone='" + phone + '\'' +
                ", password='" + password + '\'' +
                ", email='" + email + '\'' +
                ", nickName='" + nickName + '\'' +
                ", createTime='" + createTime + '\'' +
                ", avatar='" + avatar + '\'' +
                ", slogan='" + slogan + '\'' +
                ", appkey='" + appkey + '\'' +
                '}';
    }
}